package pt.ua.miect.sd.simuladorpesca.entities;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/*
 * The company has several boats
 */
public class Company {
    private CopyOnWriteArrayList<Boat> companyBoats;
    private String companyID;

    /**
     *
     * @param companyID
     * @param boats
     */
    public Company(String companyID, int boats) {
         companyBoats = new CopyOnWriteArrayList<Boat>();
        this.companyID = companyID;
        for (int i= 0; i < boats; i++) {
            String boatId = companyID+"-Boat"+i;
            companyBoats.add(new Boat(boatId, companyID));
        }

    }

    /**
     * Gets list of all foats of the company
     * @return
     */
    public List<Boat> getBoats() {
        return companyBoats;
    }

    /**
     * @return the companyID
     */
    public String getCompanyID() {
        return companyID;
    }






}
